package edu.nuc.ahm.juc.function;

import java.util.function.Consumer;

/*
* 消费型接口
*  只有输入没有返回值 就是消费
*
* */
public class Demo3 {
    public static void main(String[] args) {
        Consumer<String> consumer = new Consumer<String>() {
            @Override
            public void accept(String s) {
                System.out.println(s);
            }
        };
        consumer.accept("消费就完事了");
        Consumer<String> consumer1 = s->{
            System.out.println(s);
        };
        System.out.println("消费！！！");


    }
}
